package com.hyt.it.ogt.pj.data.exception;

import com.hyt.core.exception.ExceptionResult;
import com.hyt.core.exception.NestedRuntimeException;

public class MarkException extends NestedRuntimeException {
    private static final long serialVersionUID = -4594288245998945585L;
    ExceptionResult serverException;
    String businessMes;

    public MarkException(String msg) {
        super(msg);
        this.businessMes = msg;
    }

    public MarkException(Throwable cause) {
        super(cause);
    }

    public MarkException(String msg, Throwable cause) {
        super(msg, cause);
        this.businessMes = msg;
    }

    public ExceptionResult getServerException() {
        return this.serverException;
    }

    public void setServerException(ExceptionResult serverException) {
        this.serverException = serverException;
    }
    
    @Override
    public String getMessage() {
        return super.getMessage(7);
    }

    public String getBusinessMessage() {
        return this.businessMes == null ? "" : this.businessMes;
    }
}
